<section class="section">
  <div class="section-body">
    <div class="row">
      <div class="col-12 col-md-6 col-lg-12">
        <div class="card">
          <div
            class="card-header d-flex justify-content-between align-items-center"
          >
            <h4 class="m-0">企业招聘管理</h4>
            <div class="d-flex align-items-center">
              <div class="input-group mr-2" style="width: 600px">
                <select
                  class="form-control"
                  id="searchType"
                  style="width: 50px"
                >
                  <option value="id">ID</option>
                  <option value="jobTitle">岗位</option>
                  <option value="companyName">企业</option>
                  <option value="companyEmail">邮箱</option>
                </select>
                <input
                  type="text"
                  class="form-control"
                  placeholder="输入搜索内容"
                  id="searchInput"
                />
                <div class="input-group-append">
                  <button class="btn btn-primary" type="button" id="searchBtn">
                    <i class="fas fa-search"></i> 查询
                  </button>
                </div>
                <button class="btn btn-primary" id="addJobBtn">
                  <i class="fas fa-plus"></i> 新增
                </button>
                <button
                  class="btn btn-danger ml-2"
                  id="batchDeleteBtn"
                  disabled
                >
                  <i class="fas fa-trash"></i> 批量删除
                </button>
              </div>
            </div>
          </div>
          <div class="card-body p-0">
            <div class="table-responsive">
              <table class="table table-striped table-md">
                <thead>
                  <tr>
                    <th>
                      <div class="custom-checkbox custom-control">
                        <input
                          type="checkbox"
                          class="custom-control-input"
                          id="selectAll"
                        />
                        <label
                          for="selectAll"
                          class="custom-control-label"
                        ></label>
                      </div>
                    </th>
                    <th>ID</th>
                    <th>招聘岗位</th>
                    <th>企业名称</th>
                    <th>工作类型</th>
                    <th>招聘人数</th>
                    <th>薪资待遇</th>
                    <th>工作地点</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody id="jobTableBody"></tbody>
              </table>
            </div>
          </div>
          <div class="card-footer text-right">
            <nav class="d-inline-block">
              <ul class="pagination mb-0" id="pagination"></ul>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- 招聘信息表单模态框 -->
  <div class="modal fade" id="jobModal" tabindex="-1">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">招聘信息表单</h5>
          <button type="button" class="close" id="modalClose">
            <span>&times;</span>
          </button>
        </div>
        <form id="jobForm">
          <div class="modal-body">
            <input type="hidden" id="jobId" />
            <div class="row">
              <div class="col-md-6">
                <div class="form-group">
                  <label>招聘岗位</label>
                  <input
                    type="text"
                    class="form-control"
                    id="jobTitle"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>企业名称</label>
                  <input
                    type="text"
                    class="form-control"
                    id="companyName"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>工作类型</label>
                  <input
                    type="text"
                    class="form-control"
                    id="jobType"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>企业邮箱</label>
                  <input
                    type="email"
                    class="form-control"
                    id="companyEmail"
                    required
                  />
                </div>
              </div>
              <div class="col-md-6">
                <div class="form-group">
                  <label>联系人</label>
                  <input
                    type="text"
                    class="form-control"
                    id="contactPerson"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>联系电话</label>
                  <input
                    type="tel"
                    class="form-control"
                    id="contactPhone"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>招聘人数</label>
                  <input
                    type="number"
                    class="form-control"
                    id="hireNumber"
                    min="1"
                    value="1"
                  />
                </div>
                <div class="form-group">
                  <label>薪资待遇</label>
                  <input
                    type="text"
                    class="form-control"
                    id="salaryRange"
                    placeholder="例如：8k-15k"
                  />
                </div>
              </div>
            </div>
            <div class="row">
              <div class="col-12">
                <div class="form-group">
                  <label>工作地点</label>
                  <input
                    type="text"
                    class="form-control"
                    id="workLocation"
                    required
                  />
                </div>
                <div class="form-group">
                  <label>职位要求</label>
                  <textarea
                    class="form-control"
                    id="jobRequirements"
                    rows="4"
                  ></textarea>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button
              type="button"
              class="btn btn-secondary"
              data-dismiss="modal"
            >
              关闭
            </button>
            <button type="submit" class="btn btn-primary">保存</button>
          </div>
        </form>
      </div>
    </div>
  </div>

  <!-- 投递简历模态框 -->
  <div class="modal fade" id="applyModal" tabindex="-1">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">投递简历</h5>
          <button type="button" class="close" id="applyModalClose">
            <span>&times;</span>
          </button>
        </div>
        <form id="applyForm">
          <div class="modal-body">
            <input type="hidden" id="jobId" />
            <div class="form-group">
              <label>企业名称</label>
              <input
                type="text"
                class="form-control"
                id="companyName"
                readonly
              />
            </div>
            <div class="form-group">
              <label>岗位名称</label>
              <input type="text" class="form-control" id="jobTitle" readonly />
            </div>
            <div class="form-group">
              <label>工作类型</label>
              <input type="text" class="form-control" id="jobType" readonly />
            </div>
            <div class="form-group">
              <label>求职者姓名</label>
              <input
                type="text"
                class="form-control"
                id="seekerName"
                required
              />
            </div>
            <div class="form-group">
              <label>求职者电话</label>
              <input
                type="tel"
                class="form-control"
                id="seekerPhone"
                required
              />
            </div>
            <div class="form-group">
              <label>求职者邮箱</label>
              <input
                type="email"
                class="form-control"
                id="seekerEmail"
                required
              />
            </div>
          </div>
          <div class="modal-footer">
            <button
              type="button"
              class="btn btn-secondary"
              data-dismiss="modal"
            >
              关闭
            </button>
            <button type="submit" class="btn btn-primary">提交</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</section>
